package day4;

/**
 * 调用父类的构造器
 */
class Base{

    public double size;

    public String name;

    public Base(double size,String name){
        this.size  = size;
        this.name = name;
    }

}


public class Sub  extends Base{

    public String color;

    public Sub(double size,String name,String color){
            super(size,name);
            this.color = color;
    }


    public void run(){

        Sub s = new Sub(5.6,"clz","red");

        System.out.println(s.size+"----"+s.name+"----"+s.color);


    }

}
